import React from "react"
import "./style.less"
import {connect} from 'react-redux'
import {Link} from 'react-router-dom';
import SearchInput from '../../../component/SearchInput'
class HomeHeader extends React.Component {
    render() {
        return (
            <div id="home-header" className="clear-fix">
                <div className="home-header-left float-left">
                    <Link to="/city">{this.props.city.cityName }</Link>
                    <i className="icon-angle-down"></i>
                </div>
                <div className="home-header-right float-right">
                    <Link to="/car">
                        <i className="iconfont icon-car"></i>
                    </Link>
                   
                </div>
                <div className="home-header-middle">
                    <div className="search-container">
                        <i className="icon-search"></i>
                        <SearchInput />
                    </div>
                </div>
            </div>
        )
    }
}

const mapStateToProps = (state)=>{
    return {
        city : state.city
    }
}
export default connect(mapStateToProps)(HomeHeader)